#ifndef LIVE2D_H
#define LIVE2D_H

//#include "../../PluginThreads/bashpluginthread.h"

#include "scpdialog.h"

#include <QApplication>
#include <QDesktopWidget>
#include <QMenu>
#include <QSystemTrayIcon>
#include <QtX11Extras/QX11Info>
#include <QWebEngineView>
//#include <X11/extensions/shape.h>

class Live2D : public QWebEngineView
{
    Q_OBJECT

public:
    Live2D(QWidget *parent = nullptr);

public slots:

    void createRightClickMenu(const QPoint &pos);


protected:

    bool eventFilter(QObject *object, QEvent *event) override;

    void mousePressEvent(QMouseEvent *) override;

public slots:
    void showScpDialog();

private:
    QString currentModel;
    QMap<QString, QAction*> actionMap;

    // BashPluginThread *pluginThread = nullptr;

    void AddSystemTrayMenu();
    void SetWindowPos();
    void ChangeModel(const QString& modelName);

    void initScpPlugin();

    void exitProgram();

};

#endif // LIVE2D_H
